<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends Action {
    public function index()
	{
	   
		$this->display();
    }
	 public function detail(){
   			
        $this->display();
    }
    public function impdata()
    {
      impdata();
    }

    public function chusdhua(){
        $goods_id=pg('data1');
        session('goodsid',$goods_id);exit;
    }
    public function qingchu(){
        session('goodsid',null);exit;
    }

    public function dindans(){
        $lindind3=session('lindind');
        $neirong=pg('data1');
        if(empty($lindind3)){
            $arr = explode("\n",$neirong);
        }else{
            $arr2 = explode("\n",$neirong);
            $arr = array_merge($lindind3,$arr2);
        }

        session('lindind',$arr);
        $lindind=session('lindind');

        ?>
        <thead>
        <tr>
            <th>序号</th>
            <th>订单编号</th>
            <th>姓名</th>
            <th>电话</th>
            <th>地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php
        foreach ($lindind as $k=>$v){
            $zifsa = explode("，",$v);
        ?>
            <tr title="" class="">
                <td><?php echo $k+1; ?></td>
                <td><?php echo $zifsa[0]; ?></td>
                <td><?php echo $zifsa[1]; ?></td>
                <td><?php echo $zifsa[2]; ?></td>
                <td><?php echo $zifsa[3]; ?></td>
                <td><span class="table_delete" onclick="shuhdsa(<?php echo $k; ?>);">删除</span></td>
            </tr>
        <?php
        }
        ?>
        </tbody>
        <?php
    }

    public function dindans2(){
        $lindind4=session('lindind');
        $neirong=pg('data1');
        unset($lindind4[$neirong]);
        $lindind4=array_values($lindind4);
        session('lindind',$lindind4);
        $lindind=session('lindind');

        ?>
        <thead>
        <tr>
            <th>序号</th>
            <th>订单编号</th>
            <th>姓名</th>
            <th>电话</th>
            <th>地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php
        foreach ($lindind as $k=>$v){
            $zifsa = explode("，",$v);
            ?>
            <tr title="" class="">
                <td><?php echo $k+1; ?></td>
                <td><?php echo $zifsa[0]; ?></td>
                <td><?php echo $zifsa[1]; ?></td>
                <td><?php echo $zifsa[2]; ?></td>
                <td><?php echo $zifsa[3]; ?></td>
                <td><span class="table_delete" onclick="shuhdsa(<?php echo $k; ?>);">删除</span></td>
            </tr>
            <?php
        }
        ?>
        </tbody>
        <?php
    }

}